package com.example.yuwei.registerlogin_system.presenter;

import android.os.Handler;

import com.example.yuwei.registerlogin_system.bean.User;
import com.example.yuwei.registerlogin_system.module.loginModule.LoginModule;
import com.example.yuwei.registerlogin_system.module.loginModule.LoginModuleImp;
import com.example.yuwei.registerlogin_system.view.LoginView;

public class LoginPresenter {
    private LoginView loginView;
    private LoginModule loginModule;
    private Handler mh;

    public LoginPresenter(LoginView loginview) {
        this.loginView = loginview;
        loginModule = new LoginModuleImp();
    }

    public void login() {
        User user = new User();
        loginView.setData(user);
        android.os.Handler mh = loginView.showMessage();
        loginModule.login(user, mh);
    }
}
